import os

# 假设你想从当前工作目录中删除名为"example.txt"的文件
file_path = "example.txt"
if os.path.exists(file_path):  # 检查文件是否存在
    os.remove(file_path)
    print(f"File {file_path} has been removed.")
else:
    print(f"File {file_path} does not exist or cannot be found.")